package com.slz3.business.module.configManagement.conSiteCounty.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCounty;
import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCountyCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCountyResController {

    static Mono<ServerResponse> add(ServerRequest req, ConSiteCounty conSiteCounty) {
        if (ConSiteCountyResUnsafeValid.add(req, conSiteCounty)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.add_$ConSiteCountyUpdateLock(req, conSiteCounty);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        if (ConSiteCountyResUnsafeValid.delete(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.delete_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConSiteCounty conSiteCounty) {
        if (ConSiteCountyResUnsafeValid.modify(req, conSiteCounty)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.modify_$ConSiteCountyUpdateLock(req, conSiteCounty);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConSiteCountyResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConSiteCountyResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.info_$ConSiteCountyUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConSiteCountyResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        //
        if (ConSiteCountyResUnsafeValid.auditSubmit(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.auditSubmit_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        if (ConSiteCountyResUnsafeValid.audit(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.audit_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        if (ConSiteCountyResUnsafeValid.auditReject(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.auditReject_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        if (ConSiteCountyResUnsafeValid.usingEnable(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.usingEnable_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        if (ConSiteCountyResUnsafeValid.usingDisable(req, conSiteCountyCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCountyResAtomic.usingDisable_$ConSiteCountyUpdateLock(req, conSiteCountyCondition);
        }
    }

}
